package com.vortex.cloud.sample.utils;

import org.springframework.util.DigestUtils;

/**
 * @author 王林
 * @version 1.0
 * @date 2021-10-14 周四
 * @time 9:19
 * @description
 */
public class MD5Utils {

    private static final String MD5_KEY = "@#$%$%23^&*^*)*(";

    /**
     * MD5 加密
     */
    public static String EncodeMD5(String text) {
        String encodeStr = text;
        try {
            //加密后的字符串
            String tmp = text + MD5_KEY;
            encodeStr = DigestUtils.md5DigestAsHex(text.getBytes());

        } catch (Exception e) {
            e.printStackTrace();
        }
        return encodeStr;
    }

}
